<?php

/**
 * LogPlanilla filter form.
 *
 * @package    ehockey
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class LogPlanillaFormFilter extends BaseLogPlanillaFormFilter
{
	public function configure()
	{
		$culture = sfContext::getInstance()->getUser()->getCulture();
		$years = range(2010, 2100);
		$date_config = array('years' => array_combine($years, $years), 'culture' => $culture);
		$from_widget = new sfWidgetFormJQueryDate(array('date_widget' => new sfWidgetFormI18nDate($date_config, array('class' => 'date')), 'culture' => $culture));
		$to_widget = new sfWidgetFormJQueryDate(array('date_widget' => new sfWidgetFormI18nDate($date_config, array('class' => 'date')), 'culture' => $culture));
		$this->widgetSchema['created_at'] = new sfWidgetFormDateRange(array('from_date' => $from_widget, 'to_date' => $to_widget, 'template' => 'desde %from_date%<br />hasta %to_date%'));
	}
}
